package controller;

import entity.User;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.apache.shiro.authz.annotation.RequiresRoles;
import org.apache.shiro.subject.Subject;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * 进入主页界面
 */
@Controller
@RequestMapping(value="/toindex")
public class IndexController {

    @RequestMapping(value = "/index")
    @RequiresRoles("administrator")
    public  String index(){
        return "views/layout";}
}
